//
//  RJHomeBottomFatherView.h
//  AirQuality
//
//  Created by Po on 15/3/16.
//  Copyright (c) 2015年 Po. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "RJPieCartView.h"

typedef NS_ENUM(NSUInteger, HomeBottomTableType) {
    HomeBottomTableAQI = 0,                     //全省
    HomeBottomTableCity,                    //城市
    HomeBottomTablePosition                 //农村站点
};


@protocol RJHomeBottomFatherViewDelegate;
@protocol RJHomeBottomFatherViewMoveDelegate;

@interface RJHomeBottomFatherView : UIView

@property (assign, nonatomic) NSInteger offLine;               //离线
@property (assign, nonatomic) NSInteger onLine;                //在线
@property (retain, nonatomic) NSArray * detailData;            //数据
@property (assign, nonatomic) CGRect viewRect;                 //View填充大小
@property (assign, nonatomic) CGFloat detailHeight;            //详情高度
@property (assign, nonatomic) HomeBottomTableType type;        //是否为城市
@property (assign, nonatomic) BOOL isLoadingShow;              //正在加载
@property (assign, nonatomic) BOOL isConnecting;               //正在连接中
@property (retain, nonatomic) RJLoadView * loadView;
@property (retain, nonatomic) UILabel * pieTitleLabel;         //饼图标题


@property (retain, nonatomic) UIView * pieContentView;
@property (retain, nonatomic) UIView * tableContentView;
@property (retain, nonatomic) RJPieCartView * pieView;         //饼图
@property (retain, nonatomic) UITableView * tableView;         //列表

@property (assign, nonatomic) UIViewController * vc;
@property (assign, nonatomic) id <RJHomeBottomFatherViewDelegate> delegate;
@property (assign, nonatomic) id <RJHomeBottomFatherViewMoveDelegate> moveDelegate;

///**获取下方视图*/
//- (UIView *)getBottomView:(CGRect)rect;

/**获取饼图*/
- (RJPieCartView *)getPieView:(CGRect)rect title:(NSString *)title;

/**设置饼图详情按钮*/
- (void)showPieViewButton;

/**获取列表*/
- (UITableView *)getTableView:(CGRect)rect;

/**设置数据*/
- (void)setData:(NSArray *)data;

/**显示加载动画*/
- (void)showLoadingView;

/**移除加载动画*/
- (void)freeLoadingView;

/**释放*/
- (void)freeData;

/**网络请求结束,乱*/
- (void)netFinish:(NetRequestStatus)status;

///**网络请求重试*/
//- (void)netRetry;
@end



@protocol RJHomeBottomFatherViewDelegate <NSObject>
/**网络请求失败*/
//- (void)netRequestFailure;
/**设置数据*/
- (void)setData:(NSArray *)data;
/**释放*/
- (void)freeData;
@end



@protocol RJHomeBottomFatherViewMoveDelegate <NSObject>
/**滑动*/
- (void)touchMove:(BOOL)isLeft;

@optional

- (void)HomeBottomFatherView:(RJHomeBottomFatherView *)vc netFinish:(NetRequestStatus)status;
@end
